package com.baseweb.webadmin.service;

import com.baseweb.webadmin.core.model.bvo.*;
import com.baseweb.webadmin.core.model.pojo.*;
import org.joda.time.DateTime;
import com.baseweb.webadmin.core.util.RequestPage;

import java.util.List;
import java.util.Map;

public interface UserService {
    /**
     * 通过用户名查询用户信息
     *
     * @param username
     * @return
     */
    public User selectByName(String username);

    public User selectUserByToken(String token);

    public List<User> selectUserByIds(List<Integer> ids);

    /**
     * 查询非当前用户的所有用户列表
     *
     * @param username
     * @return
     */
    public List<User> selectUsers(String username);

    /**
     * 通过用户id查询用户信息
     *
     * @param userid
     * @return
     */
    public User selectUserById(Integer userid);

    /**
     * 保存用户信息
     *
     * @param user
     * @return
     */
    public int insertUser(User user);

    /**
     * 通过角色id删除用户角色中间表
     *
     * @param roleId
     * @return
     */
    public int deleteUserRoleByRoleId(Integer roleId);

    /**
     * 通过用户id删除用户角色中间表
     *
     * @param userId
     * @return
     */
    public int deleteUserRoleByUserId(Integer userId);

    /**
     * 批量删除user_role根据用户id和角色id
     * @param userRoleKeyList
     */
    public void deleteUserRoleByUserRoleKey(List<UserRoleKey> userRoleKeyList);

    /**
     * 通过用户id删除用户信息
     *
     * @param userId
     * @return
     */
    public int deleteUserById(Integer userId);

    /**
     * 修改用户信息
     *
     * @param user
     * @return
     */
    public int updateUser(User user);

    /**
     * 分页查询用户
     * @return
     */
    public List<UserRoleBvo> selectUsersByPage(int pageNo, int pageSize, Map map);

    /**
     * 根据名字查找用户的总记录数
     *
     * @return
     */
    public Integer getRowsByName(Map map);


    /**
     * 验证用户名似否已被使用
     * @param userName
     * @return
     */
    public boolean verifyUserName(String userName);

    /**
     * 验证邮箱似否已被使用
     * @param email
     * @return
     */
    public boolean verifyEmail(String email);

    public List<User> selectUserByUserType(Integer userType, Integer status);

    public List<User> selectAgentUserList(Integer agentId, Integer status, String cn_name, String username, String identity, Integer start, Integer offset);

    public Integer selectAgentUserListCount(Integer agentId, Integer status, String cn_name, String username, String identity);

    public User selectUserByWxId(String openId, String unionId);
    /**
     *
     //     * @param personalInfo
     */
//    public void insertPersonalInfo(PersonalInfo personalInfo);

    public int updateByPrimaryKey(User record);

    public List<User> selectUserListByPage(Integer id, String username, Integer start, Integer offset);

    public Integer selectUserListCount(Integer id, String username);

    public List<User> selectUserListByTypeAndPage(Integer user_type, Integer start, Integer offset);

    public Integer selectUserListByTypeCount(Integer user_type);


    public Integer insertBizVerify(ByUserBizAuth byUserBizAuth);
    public ByUserBizAuth findBizVerify(Integer id);
    public List<ByUserBizAuth> selectBizVerifyListByPage(Integer userId, Integer authType, String name, Integer start, Integer offset);
    public List<ByUserBizAuthvo> selectBizVerifyListByPage1(ByUserBizAuthvo auth, Integer start, Integer offset);
    public Integer selectBizVerifyListCount(Integer userId, Integer authType, String name);
    public Integer selectBizVerifyListCount1(ByUserBizAuthvo auth);
    public List<ByUserBizAuth> selectBizVerifyListByPage(Integer userId, Integer authType, String name, Integer start, Integer offset,Integer status);
    public Integer selectBizVerifyListCount(Integer userId, Integer authType, String name,Integer status);

    public List<UserVerifyBvo> selectBizVerifyStatusList(List<Integer> userId, Integer status);
    public List<ByUserBizAuth> selectBizVerifyStatusList1(Integer userId);


    public Integer insertBizPackage(ByUserBizPackage byUserBizPackage);
    public ByUserBizPackage findBizPackage(Integer id);
    public List<ByUserBizPackage> selectPackageListByPage(Integer userId, String name, Integer start, Integer offset);
    public Integer selectPackageListCount(Integer userId, String name);

    public Integer insertBizPackageDetail(ByUserBizPackageDetail byUserBizPackageDetail);
    public ByUserBizPackageDetail findBizPackageDetail(Integer id);
    public List<ByUserBizPackageDetail> selectPackageDetailListByPage(Integer userId, Integer packageId, Integer productId, Integer start, Integer offset);
    public Integer selectPackageDetailListCount(Integer userId, Integer packageId, Integer productId);

    public Integer insertBizProduct(ByUserBizProduct byUserBizProduct);
    public ByUserBizProduct findBizProduct(Integer id);
    public List<ByUserBizProduct> findBizProductList(List<Integer> ids);
    public List<ByUserBizProduct> selectProductListByPage(Integer userId, Integer productType, Integer channelId, Integer start, Integer offset,
                                                          String sortBy, String styleType, String price, String keyword);

    /**
     * 报价列表
     * @param userId
     * @param start
     * @param offset
     * @return
     */
    public List<ByUserBizProductBvo> selectProductVoListByPage(Integer userId, String userName, String userMobile, String userChannel, String keyword,
                                                               Integer auditType, Integer status, String startTime, String endTime,
                                                               String province, String city, String county, Integer start, Integer offset);

    public List<ByUserBizProductBvo> selectProductVoListByPage(String userName, String userMobile, Integer userChannel, String keyword,
                                                               Integer auditType, Integer status, String startTime, String endTime,
                                                               String province, String city, String county, Integer start, Integer offset);

    public Integer selectProductListCount(Integer userId, Integer productType, Integer channelId,
                                          String sortBy, String styleType, String price, String keyword);

    public Integer selectProductListCount(String userName, String userMobile, String userChannel, String keyword,
                                          Integer auditType, Integer status, String startTime, String endTime,
                                          String province, String city, String county);


    public List<ByUserBizProduct> selectProductListByPage(Integer userId, Integer productType, Integer channelId, Integer start, Integer offset,
                                                          String sortBy, String styleType, String price, String keyword, Integer status);
    public Integer selectProductListCount(Integer userId, Integer productType, Integer channelId,
                                          String sortBy, String styleType, String price, String keyword, Integer status);

//    public List<ByUserBizProduct> selectProductListByPage(List<Integer> userIds);

    public Integer insertOpenCity(ByOpenCity byOpenCity);
    public ByOpenCity findOpenCity(Integer id);
    public Integer deleteOpenCity(Integer id);
    public List<ByOpenCity> selectOpenCityListByPage(Integer userId, Integer openType, String province, Integer start, Integer offset);
    public Integer selectOpenCityListCount(Integer userId, Integer openType, String province);
    public List<Map> selectAllCities();
    public List<String> selectAllCitiesList();
    public List<ByOpenCity> selectAllCitiesObjectList(Integer userId);

    public List<ByUserTrolley> selectTrolleyListByPage(Integer userId, Integer start, Integer offset);
    public Integer selectTrolleyListCount(Integer userId);

    public Integer insertTrolley(ByUserTrolley byUserTrolley);
    public ByUserTrolley findTrolley(Integer id);
    public ByUserTrolley findTrolleyByUserAndProduct(Integer userId, Integer productId);
    /**
     * zx  购物车联合查询全部
     * @param userId
     * @return
     */
    List<ByUserTrolleyBvo> selectByUserTrolleyList(Integer userId);
    public List<ByUserBizProduct> selectTrolleyProductListByPage(Integer userId, Integer start, Integer offset);
    public Integer selectTrolleyProductListCount(Integer userId);

    public Integer deleteTrolley(Integer id);
    public Integer deleteTrolleyByUserAndProduct(Integer userId, List<Integer> productIds);

    public Integer insertInvite(ByUserInvite byUserInvite);
    public ByUserInvite findInvite(Integer id);
    //谁邀请了我
    public ByUserInvite findInviteBy(Integer userId);
    //被我邀请的人
    public List<ByUserInvite> selectInviteListByPage(Integer userId, Integer inviteBy, Integer start, Integer offset);
    public Integer selectInviteListCount(Integer userId, Integer inviteBy);

    public Integer insertBudget(ByUserWedBudget byUserWedBudget);
    public ByUserWedBudget findBudget(Integer id);
    public List<ByUserWedBudget> selectBudgetListByPage(Integer userId, Integer start, Integer offset);
    public List<ByUserWedBudget> selectIntentCustomListByPage(ByUserWedBudget custom, Integer start, Integer offset);
    public Integer selectBudgetListCount(Integer userId);
    public Integer selectIntentCustomListCount(ByUserWedBudget custom);

    public Integer insertExample(ByUserExample byUserExample);
    public ByUserExample findExample(Integer id);
    public Integer deleteExample(Integer id);
    public List<ByUserExample> selectExampleListByPage(Integer userId, Integer status, Integer exampleType, Integer start, Integer offset);

    /**
     * 我的作品分页列表
     * @param exampleBvo
     * @param requestPage
     * @return
     */
    public List<ByUserExampleBvo> selectExampleBvoListByPage(ByUserExampleBvo exampleBvo, RequestPage requestPage);
    public Integer selectExampleListCount(Integer userId, Integer status, Integer exampleType);

    public Integer insertExampleDetail(ByUserExampleDetail byUserExampleDetail);
    public ByUserExampleDetail findExampleDetail(Integer id);
    public Integer deleteExampleDetail(Integer id);
    public List<ByUserExampleDetail> selectExampleDetailListByPage(Integer userId, Integer exampleId, Integer status, Integer start, Integer offset);
    public Integer selectExampleDetailListCount(Integer userId, Integer exampleId, Integer status);

    //商家列表
    public List<User> selectBizUserListByPage(Integer productType, Integer keyId,Integer channelId, String sortBy, String styleType, String price, String keyword, Integer start, Integer offset,
                                              Integer status, String city, String area, String orderBy);
    public Integer selectBizUserListCount(Integer productType,Integer keyId, Integer channelId, String sortBy, String styleType, String price, String keyword,
                                          Integer status, String city, String area);


    //加盟代理
    public Integer insertAgentCity(ByUserBizAgentCity byUserBizAgentCity);
    public ByUserBizAgentCity findAgentCity(Integer id);
    public Integer deleteAgentCity(Integer id);
    public List<ByUserBizAgentCity> selectAgentCityListByPage(Integer userId, Integer start, Integer offset);
    public Integer selectAgentCityListCount(Integer userId);

    //推荐用户
    public Integer insertRecommendUser(ByUserRecommend byUserRecommend);
    public ByUserRecommend findRecommendUser(Integer id);
    public Integer deleteRecommendUser(Integer id);
    public List<ByUserRecommend> selectRecommendUserListByPage(Integer userId, Integer status, Integer exampleId, Integer start, Integer offset);
    public Integer selectRecommendUserListCount(Integer userId, Integer status, Integer exampleId);

    //根据登录名查询
    public User selectByUserName(String userName);

    /**
     * 查询所有省份
     */
    public List<ByOpenCity> findAllProvince();

    /**
     * 根据省份查询所有市
     */
    public List<ByOpenCity> findAllCityByProvince(String province);

    /**
     * 根据市查询所有区
     */
    public List<ByOpenCity> findAllAreaByCity(String city);

    /**
     * 查询客户详细信息所有
     */
    public List<User> findAllUserFormByPage(int page,int pageNum,String cnName,String trueName,String idCard,String userName,String province,String city,String area);
    public int countUserFormByPage(String cnName,String trueName,String idCard,String userName,String province,String city,String area);

    /**
     * 查询客户详细信息所有(根据用户类型)
     */
    public List<User> findAllUserFormByPageUserType(int userType,int page,int pageNum,String cnName,String trueName,String idCard,String userName,String province,String city,String area);
    public int countUserFormByPageUserType(int userType,String cnName,String trueName,String idCard,String userName,String province,String city,String area);

    /**
     * 查询客户详细信息所有(根据用户id)
     */
    public List<User> findUserFormByPageUserId(Integer id,int page,int pageNum,String cnName,String trueName,String idCard,String userName,String province,String city,String area);
    public int countUserFormByPageUserId(Integer id,String cnName,String trueName,String idCard,String userName,String province,String city,String area);

    /**
     * 查询客户详细信息所有(根据区域)
     */
    public List<User> findUserFormByPageArea(int userId,int page,int pageNum,String cnName,String trueName,String idCard,String userName,String province,String city,String areaWhere);
    public int countUserFormByPageArea(String area,String cnName,String trueName,String idCard,String userName,String province,String city,String areaWhere);

    /**
     * 根据Userid查询证书
     */
    public List<ByUserBizAuth> findByUserBizAuthByUserId(Integer userId);

    /**
     * 根据登录名密码查询客户信息
     */
    public User findUserByNamePassWord(String userName,String passWord);

    /**
     * 根据登录名查询客户详细信息
     */
    public User findUserByUserName(String userName);

    /**
     * 查询所有省市区列表带分页和查询条件、支持模糊
     */
    public List<ByOpenCity> findAllListPageByWhere(String where,int page,int pageNum);

    /**
     * 查询所有省市区列表带分页和查询条件、支持模糊count
     */
    public int countAllListPageByWhere(String where);

    /**
     * 插入省市区
     */
    public int insertSelectiveCity(ByOpenCity byOpenCity);

    /**
     * 编辑省市区
     */
    public int updateByPrimaryKeySelectiveCity(ByOpenCity byOpenCity);

    /**
     * 根据省市区查询
     */
    public ByOpenCity findByProvinceCityArea(String province,String city,String area);

    /**
     * 删除开通城市
     */
    public int deleteOpenCityByPrimaryKey(Integer id);

    /**
     * 查询所有省市区列表带分页和查询条件
     */
    public List<ByOpenCity> findAllListByWhere(int userId,String where);

    /**
     * 插入角色服务城市关系表
     */
    public int insertRoleOpenCity(int userId,int openId);

    /**
     * 根据roleId 删除关系表
     */
    public int deleteRoleOpenCityByRoleId(int userId);

    /**
     * 根据openCityId 删除关系表
     */
    public int deleteRoleOpenCityByOpenCityId(int openCityId);

    /**
     * 查询用户关联的所有省市区列表带分页和查询条件
     */
    public List<ByOpenCity> findAllUserListPageByWhere(int userId,String where,int page,int pageNum);

    /**
     * 查询用户关联的所有省市区列表带分页和查询条件count
     */
    public int countAllUesrListPageByWhere(int userId,String where);

    /**
     * 添加用户服务城市
     */
    public int insertUserOpenCity(ByOpenCity record);

    /**
     * 根据userId 删除服务城市
     */
    public int deleteUserOpenCityByRoleId(int userId);

    /**
     * 根据userid省市区查询用户服务城市
     */
    public ByOpenCity findByUserIdProvinceCityArea(String province,String city,String area,int userId);

    /**
     * 根据userid用户服务城市
     */
    public List<ByOpenCity> findUserCityByUserId(int userId);

    /**
     * 根据id删除服务城市
     */
    public int deleteUserOpenCityById(int id);

    /**
     * 查询所有开通省市区 查询条件
     */
    public List<ByOpenCity> findAllProvinceCityListByWhere(String where);

    /**
     * 根据状态查询客户详细信息所有
     */
    public List<User> findAllUserFormByStatusPage(int status,String username,int page,int pageNum);

    /**
     * 根据状态查询客户详细信息所有count
     */
    public int countUserFormByStatusPage(int status,String username);

    /**
     * 分页查询案例推荐
     * @param userId
     * @param status
     * @param exampleId
     * @return
     */
    public List<ByUserRecommendBvo> selectByUserRecommendBvoListByPage(Integer userId, Integer status, Integer exampleId,RequestPage page);

    /**
     * 用户匹配搜索关键字授权
     */
    public int insertIntoUserChannel(int userId,int channelId);

    /**
     * 根据用户删除搜索匹配
     */
    public int deleteUserChannelByUserId(int userId);

    /**
     * 根据搜索id删除搜索匹配
     */
    public int deleteUserChannelByChannelId(int channelId);

    /**
     * 根据搜索id查询所有用户信息
     */
    public List<User> findAllUserFormByChannelId(int channelId);

    /**
     * 根据根据user关联查询关键字
     */
    public List<ByChannelKeyword> findAllByChannelKeywordByUserChannel(String username);

    /**
     * 角色系统功能授权
     */
    public int insertIntoRescRole(int rescId,int roleId);

    /**
     * 根据功能id删除权限关联表
     */
    public int deleteRescRoleByRescId(int rescId);

    /**
     * 根据角色id删除权限关联表
     */
    public int deleteRescRoleByRoleId(int roleId);

    /**
     * 根据当前登录账号拥有权限 查询即将授权的角色的所有功能权限 带已经授权状态
     */
    public List<Resc> findAllRescByRoleIdFromUserId(int userId,int roleId);

    /**
     * 删除案例选婚礼预算
     * @param id
     * @return
     */
    public Integer deleteByExampleBudgetKey(Integer id);

    /**
     * 根据主键查询婚礼预算
     * @param id
     * @return
     */
    public ByExampleBudget selectByExampleBudgetKey(Integer id);

    /**
     * 新增婚礼预算
     * @param record
     * @return
     */
    public Integer insertExampleBudget(ByExampleBudget record);

    /**
     * 根据主键修改婚礼预算
     * @param byExampleBudget
     * @return
     */
    public Integer updateByExampleBudgetKey(ByExampleBudget byExampleBudget);

    /**
     * 分页查询婚礼预算
     * @param exampleId
     * @param page
     * @return
     */
    public List<ByExampleBudget> selectExampleBudgetListByPage(Integer exampleId, RequestPage page);

    /**
     * 删除案例评论
     * @param id
     * @return
     */
    public Integer deleteByExampleDiscussKey(Integer id);

    /**
     * 根据主键查询案例评论
     * @param id
     * @return
     */
    public ByExampleDiscuss selectByExampleDiscussKey(Integer id);

    /**
     * 新增案例评论
     * @param record
     * @return
     */
    public Integer insertExampleDiscuss(ByExampleDiscuss record);

    /**
     * 根据主键修改案例评论
     * @param
     * @return
     */
    public Integer updateByExampleDiscussKey(ByExampleDiscuss byExampleDiscuss);

    /**
     * 分页查询案例评论
     * @param exampleId
     * @param page
     * @return
     */
    public List<ByExampleDiscuss> selectExampleDiscussListByPage(Integer exampleId, RequestPage page);
    /**
     * 根据查询userId账号的所有推荐团队
     */
    public List<ByUserRecommend> findAllRecommendByUserIdPage(int userId,int page,int pageNum);

    /**
     * 根据查询userId账号的所有推荐团队count
     */
    public int countRecommendByUserIdPage(int userId);

    /**
     * 根据user_id、recommend_id查询推荐团队
     * */
    public ByUserRecommend findByUserRecommendByUserIdRecommendId(int userId,int recommendId);

    /**
     * 添加推荐团队
     */
    public int insertSelectiveRecommend(ByUserRecommend byUserRecommend);

    /**
     * 修改推荐团队
     */
    public int updateByPrimaryKeySelectiveRecommend(ByUserRecommend byUserRecommend);

    /**
     * 删除推荐团队
     */
    public int deleteByPrimaryKeyRecommed(int id);

    /**
     * 根据区域和用户类型查询所有用户信息
     */
    public List<User> findAllUserByAreaType(String area,int userType);

    /**
     * 根据区域查询服务城市的代理商
     */
    public List<User> findAllUserByArea(String area);

    /**
     * 根据邀请和状态查询所有用户信息
     */
    public List<User> findAllUserListByMobileStatusPage(int status,String mobile,int page,int pageNum);

    /**
     * 根据邀请和状态查询所有用户信息count
     */
    public int countUserListByMobileStatusPage(int status,String mobile);

    public List<ByUserBizAuth> findUserBizAuthByUserId(int userId);

    /**
     * 根据userid查询推荐团队
     */
    public List<User> findAllUserRecommendByUserId(int userId);

    /**
     * 根据userid查询推荐团队
     */
    public List<User> findAllUserChannelByUserId(int channelId,int page,int pageNum);

    /**
     * 根据userid查询推荐团队count
     */
    public int countUserChannelByUserId(int channelId);

    /**
     * 根据userid查询推荐团队
     */
    public List<AppUserList> findAllUserChannelByUserIdAPP(String area,String startPrice,String endPrice,String wedding,String order,int page,int pageNum,String roleType,String cnName,String channelIds);

    /**
     * 根据userid查询推荐团队count
     */
    public int countUserChannelByUserIdAPP(String area,String startPrice,String endPrice,String wedding,String order,String roleType,String cnName,String channelIds);


    /**
     * 根据角用户查询开通的城市
     */
    public List<ByOpenCity> findAllCityByUserId(int userId);

    /**
     * 根据角用户查询开通的区域
     */
    public List<ByOpenCity> findAllAreaByUserId(int userId);

    /**
     * 根据用户ID查询开通城市信息
     * @param userId
     * @return
     */
    public List<ByOpenCity> findOpenCityByUserId(int userId);

    /**
     * 删除字典表
     * @param id
     * @return
     */
    public Integer deleteByDictKey(Integer id);

    /**
     * 根据主键查询字典表
     * @param id
     * @return
     */
    public Dict selectByDictKey(Integer id);

    /**
     * 新增字典表
     * @param record
     * @return
     */
    public Integer insertDict(Dict record);

    /**
     * 根据主键修改字典表
     * @param
     * @return
     */
    public Integer updateByDictKey(Dict dict);

    /**
     * 分页查询字典表
     * @param type
     * @param page
     * @return
     */
    public List<Dict> selectDictListByPage(Integer type, RequestPage page);

    /**
     * 根据市查询区
     */
    public List<ByOpenCity> findAreaByCity(String city);

    /**
     * 添加关注
     * */
    public int insertIntoUserFollow(int userId,int followUserId,int type,int status);

    /**
     * 取消关注
     * */
    public int deleteUserFollowById(int userId,int followUserId);

    /**
     * 根据userid和followuserid查询关注关联
     * */
    public UserFollow findUserFollowByUserFollowUserId(int userId,int followUserId);

    /**
     * 查询商家
     * */
    public List<UserFollow> findAllUserFollowByTypeOfUser(int type,int userId, int page, int pageNum);

    /**
     * 查询商家count
     * */
    public int countUserFollowByTypeOfUser(int type,int userId);

    /**
     * 查询案例
     * */
    public List<UserFollow> findAllUserFollowByTypeOfExample(int type,int userId, int page, int pageNum);

    /**
     * 查询案例count
     * */
    public int countUserFollowByTypeOfExample(int type,int userId);

    /**
     *根据userid查询关注总数
     * */
    public int countFollowByUserId(int userId);

    /**
     * 根据followuserid查询关注总数
     * */
    public int countFollowByFollowUserId(int followUserId);

    /**
     * 查询商家列表
     * */
    public List<AppUserList> findAllUserList(String area,String startPrice,String endPrice,String wedding,String order, int page, int pageNum,String roleType,String cnName);

    /**
     * 查询商家列表count
     * */
    public int countUserList(String area,String startPrice,String endPrice,String wedding,String order,String roleType,String cnName);

    /**
     * 银行卡添加
     * */
    public int insertCard(Card card);

    /**
     * 修改银行卡信息
     * */
    public int updateCardById(Card card);

    /**
     * 银行卡查询根据id
     * */
    public Card findCardById(int id);

    /**
     * 银行卡查询全部根据userid
     * */
    public List<Card> findAllCard(int userid);

    /**
     * 添加提现记录
     * */
    public int insertCardLog(CardLog cardLog);

    /**
     * 修改提现记录
     * */
    public int updateCardLogById(CardLog cardLog);

    /**
     * 查询提现记录根据id
     * */
    public CardLog findCardLogById(int id);

    /**
     * 查询提现记录根据createtime段
     * */
    public List<CardLog> findAllCardLogByCreateTime(String startTime,String endTime,String status,int userid);

    /**
     * 根据Userid，时间段查询所有的档期
     * */
    public List<ByUserBizSchedule> findAllByUserIdDate(int userId,String startTime,String endTime);

    /**
     * 添加日程
     * */
    public int insertSchedule(Schedule schedule);

    /**
     * 修改日程
     * */
    public int updateSchedule(Schedule schedule);

    /**
     * 查询日程根据id
     * */
    public Schedule findScheduleById(int id);

    /**
     * 查询日程根据日期、时间、userid、username
     * */
    public  List<Schedule> findScheduleByWhere(String scheduledate,String scheduletime,int userid,String username);

    /**
     * 删除日程根据id
     * */
    public int deleteScheduleByid(int id);

    /**
     * 新增用户消息
     * @param userMessage
     * @return
     */
    public Integer insertUserMessage(ByUserMessage userMessage);

    /**
     * 分页查询用户消息
     * @param userId
     * @param page
     * @return
     */
    public List<ByUserMessage> selectUserMessageByPage(Integer userId, RequestPage page);

    /**
     * 删除用户消息
     * @param id
     * @return
     */
    public Integer deleteByUserMessageKey(Integer id);

    /**
     * 添加请柬
     * */
    public int insertUserInvitation(UserInvitation userInvitation);

    /**
     * 修改请柬
     * */
    public int updateUserInvitation(UserInvitation userInvitation);

    /**
     * 查询请柬根据id
     * */
    public UserInvitation findUserInvitationById(int id);

    /**
     * 查询请柬根据userid and invitationid
     * */
    public UserInvitation findUserInvitationByUserIdInvitationId(int userId,int invitationid);

    /**
     * 删除请柬根据Id
     * */
    public int deleteUserInvitation(int id);

    /**
     * 查询所有请柬模板
     * */
    public List<Invitation> findInvitation();

    /**
     * 查询用户请柬模板
     * */
    public Invitation findInvitaionByUserId(int userId);

    /**
     * 查询请柬模板根据id
     * */
    public Invitation findInvitationById(int id);

    /**
     * 添加我的请柬模板
     * */
    public int insertMyInvitation(MyInvitation myInvitation);

    /**
     * 修改我的请柬模板
     * */
    public int updateMyInvitation(MyInvitation myInvitation);

    /**
     * 删除请柬模板根据id
     * */
    public int deleteMyInvitationById(int id);

    /**
     * 清空我的请柬模板
     * */
    public int deleteMyInvitationByUserId(int userId);

    /**
     * 查询我的请柬模板
     * */
    public List<MyInvitation> findMyInvitaiton(int userId);

    /**
     * 查询我的请柬根据id
     * */
    public MyInvitation findMyInvitaitonById(int id);

    /**
     * 查询我的请柬模板根据invitaioinid 和 userid
     * */
    public MyInvitation findMyInvitaitonByInvitationUser(int invitationId,int userId);

    /**
     * 我的app显示信息
     * */
    public User findMyPersonal(String mobile);

    /**
     * 查询我的所有请柬
     * */
    public List<UserInvitation> findUserInvitaiton(int userId);

    /**
     * 修改档期为不接单
     * */
    public int udpateStatusById(int id,int status);

    /**
     * 删除银行卡信息
     * */
    public int deleteCardById(int id);

    /**
     * 银行卡查询全部根据userid 带分页
     * */
    public List<Card> findAllCardByUserIdPage(int userid,int page,int pageNum);

    /**
     * 银行卡查询全部根据userid count
     * */
    public int countCardByUserIdPage(int userid);

    /**
     * 查询提现记录根据userid page
     * */
    public List<CardLog> findAllCardLogByUserIdPage(String status,int userid,int page,int pageNum);

    /**
     * 查询提现记录根据userid count
     * */
    public int countCardLogByUserIdPage(String status,int userid);

    /**
     * 添加账户钱包流水
     * */
    public int insertSelectiveByMoneyLog(ByMoneyLog record);

    /**
     * 查询用户的钱包流水 根据userId Page
     * */
    public List<ByMoneyLog> findAllMoneyLogByUserIdPage(Integer userId,int page,int pageNum);

    /**
     * 查询用户的钱包流水 根据userId count
     * */
    public int countMoneyLogByUserIdPage(Integer userId);

}
